<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('会议文件列表')" />
</head>
<body class="gray-bg">
     <div class="container-div">
        <div class="row">
            <div class="col-sm-12 search-collapse">
                <form id="formId">
                    <div class="select-list">
                        <ul>
                           <!-- <li>
                                <label>创建人;创建人：</label>
                                <input type="text" name="createdBy"/>
                            </li>
                            <li>
                                <label>创建时间;创建时间：</label>
                                <input type="text" class="time-input" placeholder="请选择创建时间;创建时间" name="createdTime"/>
                            </li>
                            <li>
                                <label>更新人;更新人：</label>
                                <input type="text" name="updatedBy"/>
                            </li>
                            <li>
                                <label>更新时间;更新时间：</label>
                                <input type="text" class="time-input" placeholder="请选择更新时间;更新时间" name="updatedTime"/>
                            </li>
                            <li>
                                <label>删除标识;删除标识:0:未删除;1:已删除：</label>
                                <input type="text" name="isDelete"/>
                            </li>
                            <li>
                                <label>所属会议ID;所属会议ID：</label>
                                <input type="text" name="conId"/>
                            </li>
                            <li>
                                <label>上传会议文件名称;上传会议文件名称：</label>
                                <input type="text" name="confileName"/>
                            </li>
                            <li>
                                <label>上传会议文件的路径;上传会议文件的路径：</label>
                                <input type="text" name="confileUrl"/>
                            </li>
                            <li>
                                <label>会议文件排序;会议文件排序：</label>
                                <input type="text" name="confileSort"/>
                            </li>
                            <li>
                                <label>上传文件的提示;上传文件的提示：</label>
                                <input type="text" name="confilePrompt"/>
                            </li>
                            <li>
                                <label>文件是否需要转换;文件是否需要转换：</label>
                                <input type="text" name="confileIsRequired"/>
                            </li>
                            <li>
                                <label>转换会议文件的名称;转换会议文件的名称：</label>
                                <input type="text" name="confileNewName"/>
                            </li>
                            <li>
                                <label>转换会议文件的路径;转换会议文件的路径：</label>
                                <input type="text" name="confileNewUrl"/>
                            </li>
                            <li>
                                <label>转换文件的提示;转换文件的提示：</label>
                                <input type="text" name="confileNewPrompt"/>
                            </li>
                            <li>
                                <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
                                <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
                            </li>-->
                        </ul>
                    </div>
                </form>
            </div>

            <div class="btn-group-sm" id="toolbar" role="group">
                <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:files:add">
                    <i class="fa fa-plus"></i> 添加
                </a>
                <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="system:files:edit">
                    <i class="fa fa-edit"></i> 修改
                </a>
                <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:files:remove">
                    <i class="fa fa-remove"></i> 删除
                </a>
                <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:files:export">
                    <i class="fa fa-download"></i> 导出
                </a>
            </div>
            <div class="col-sm-12 select-table table-striped">
                <table id="bootstrap-table"></table>
            </div>
        </div>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var editFlag = [[${@permission.hasPermi('system:files:edit')}]];
        var removeFlag = [[${@permission.hasPermi('system:files:remove')}]];
        var prefix = ctx + "system/files";
        var conId =[[${conId}]]
        console.log(conId)

        $(function() {
            var options = {
                url: prefix + "/list?conId="+conId,
                createUrl: prefix + "/add?conId="+conId,
                updateUrl: prefix + "/edit/{id}",
                removeUrl: prefix + "/remove",
                exportUrl: prefix + "/export",
                modalName: "会议文件",
                columns: [{
                    checkbox: true
                },
                {
                    field: 'confileId',
                    title: '主键ID',
                    visible: false
                },
                {
                    field: 'conId',
                    title: '所属会议ID'
                },
                {
                    field: 'confileName',
                    title: '上传会议文件名称'
                },
                {
                    field: 'confileType',
                    title: '上传会议文件类型'
                },
                {
                    field: 'confileUrl',
                    title: '上传会议文件的路径'
                },
                {
                    field: 'confileSort',
                    title: '会议文件排序'
                },
                {
                    field: 'confilePrompt',
                    title: '上传文件的提示'
                },
                {
                    field: 'confileIsRequired',
                    title: '文件是否需要转换'
                },
                {
                    field: 'confileNewName',
                    title: '转换会议文件的名称'
                },
                {
                    field: 'confileNewType',
                    title: '转换会议文件的类型'
                },
                {
                    field: 'confileNewUrl',
                    title: '转换会议文件的路径'
                },
                {
                    field: 'confileNewPrompt',
                    title: '转换文件的提示'
                },
                {
                    title: '操作',
                    align: 'center',
                    formatter: function(value, row, index) {
                        var actions = [];
                        actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="http://localhost/'+row.confileUrl+'"target="_blank" ><i class="fa fa-edit"></i>查看文件</a> ');
                        actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.confileId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
                        actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.confileId + '\')"><i class="fa fa-remove"></i>删除</a>');
                        return actions.join('');
                    }
                }]
            };
            $.table.init(options);
        });
    </script>
</body>
</html>